package com.springboot.frame.oauth.server.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author liheng
 * @since 2020-08-28
 */
@TableName("sys_role")
public class SysRole implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户组名称
     */
    @TableField("rolename")
    private String rolename;

    /**
     * 角色描述
     */
    @TableField("role_desc")
    private String roleDesc;

    /**
     * 删除  未删除
     */
    @TableField("enable")
    @TableLogic
    private Integer enable;

    @TableField("createtime")
    private LocalDateTime createtime;

    @TableField("lasttime")
    private LocalDateTime lasttime;

    @TableField(exist = false)
    private String createTimeStr;

    public String getCreateTimeStr() {
        return createTimeStr;
    }

    public void setCreateTimeStr(String createTimeStr) {
        this.createTimeStr = createTimeStr;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }

    public LocalDateTime getLasttime() {
        return lasttime;
    }

    public void setLasttime(LocalDateTime lasttime) {
        this.lasttime = lasttime;
    }

    @Override
    public String toString() {
        return "SysRole{" +
        "id=" + id +
        ", rolename=" + rolename +
        ", roleDesc=" + roleDesc +
        ", enable=" + enable +
        ", createtime=" + createtime +
        ", lasttime=" + lasttime +
        "}";
    }
}
